package zust.javaee.service;

import zust.javaee.dto.AjaxReturn;
import zust.javaee.dto.SignCorporDto;
import zust.javaee.dto.activity.ActivityDto2;
import zust.javaee.dto.adminadd.PlayerAddDto;
import zust.javaee.dto.adminadd.ReqFormAddDto;
import zust.javaee.dto.announcement.AnnouncementDto;
import zust.javaee.dto.announcement.AnnouncementDto2;
import zust.javaee.dto.corporation.CorporationDto;
import zust.javaee.dto.player.PlayerLoginedDto;
import zust.javaee.dto.player.PlayerRegisterDto;
import zust.javaee.entity.Tplayer;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * Created by liy on 2017/1/4.
 */
public interface PlayerService extends BaseService<Tplayer> {

    /**
     * do
     * @param sId
     * @param password
     * @return
     */
    AjaxReturn<PlayerLoginedDto> doLogin(String sId, String password, HttpSession session);
    AjaxReturn doRegister(PlayerRegisterDto playerRegisterDto);
    AjaxReturn activate(Integer id, String secret);
    AjaxReturn signUpCorpor(Integer playerId, Integer corporId, ReqFormAddDto reqFormAddDto);
    AjaxReturn<List<CorporationDto>> getOnePlayerCorpor(Integer playerId);
    AjaxReturn<List<ActivityDto2>> getOnePlayerActivity(Integer playerId);
    AjaxReturn<List<AnnouncementDto2>> getOnePlayerAnn(Integer playerId);

    void upadtePlayer(Integer playerId, PlayerLoginedDto playerLoginedDto);
    AjaxReturn createCorporation(Integer playerId, SignCorporDto signCorporDto);

    boolean checkExitPlayer(Integer studentId);
    AjaxReturn checkJoinCorporation(Integer playerId, Integer corporId);

    AjaxReturn<List<PlayerLoginedDto>> getOneCorporAllPlayer(Integer corporId);



    /**
     * 基础功能
     */

    Tplayer getPlayerByStudentId(String sId);
    Tplayer getPlayerByStudentId(String sId, Short type);
    Tplayer getPlayerByStudentIdStatus(String sId, Short status);
    Tplayer getPlayerByStudentId(String sId, Short type, Short status);

    List<Tplayer> getAllPlayer();
    Long countPlayerByStudentId(String sId);
    Long countPlayerByStudentId(String sId, Short type);
    Long countPlayerByStudentIdStatus(String sId, Short status);
    Long countPlayerByStudentId(String sId, Short type, Short status);


}
